The present invention relates to industrial control and in particular to an industrial controller providing preconfigured relay ladder xe2x80x9cobjectsxe2x80x9d that may be invoked by a standard computer system.
Industrial control systems are special purpose computers used for the control of industrial equipment and the like. Generally, an industrial controller executes a program to read inputs from sensors of a controlled process and, based on these inputs and the logic of a stored control program, to write outputs to actuators of the controlled process.
Industrial controllers differ from conventional computers in a number of respects. First, industrial computers are called upon to collect and process large amounts of input and output data having differing electrical characteristics at separated locations about a factory or the like. For this reason, they are typically constructed in a highly modular fashion to allow different numbers and types of input/output (I/O) modules to be assembled together depending on the requirements of the control task. Such I/O modules may include digital I/O modules conveying a single bit of binary information or analog modules providing voltage or currents within a range determined by a binary word. Many more sophisticated I/O modules are also available as is well understood in the art.
In addition, unlike standard computer systems, industrial controllers must control complex physical processes. This requires not only rapid execution of control logic instructions so as to approximate real time, but also a predictable execution of those instructions which is not affected by minor timing variations between the execution of the program and physical process. Speed and predictability can be obtained through the use of specialized control languages and circuitry for executing such languages. One example is relay ladder language in which the instructions are represented as virtual rungs of a relay ladder. The rungs have xe2x80x9ccontactsxe2x80x9d representing input data and xe2x80x9ccoilsxe2x80x9d representing output data and are executed repeatedly in sequence from the top of the ladder to the bottom. Separate scanning hardware updates the data values of the contacts and coils in a predictable way.
Industrial controllers also differ from standard computers in that they must be extremely reliable. The hardware used for industrial controllers is designed to provide greater redundancy and error checking as well as to be physically robust against extreme environmental conditions of temperature extremes, dust and electromagnetic interference.
The control programs written for use on an industrial controller are usually unique to the particular control application. For this reason, and because programming represents a significant cost in preparing a control system, it would be highly desirable to simplify the programming process.
In standard computers, simplification of programming has led to the development of object oriented languages in which software objects are created that may be reused or duplicated (through the processes of xe2x80x9cinstancingxe2x80x9d or xe2x80x9cinheritance)xe2x80x9d to generate larger more complex programs. Each duplication of an object uses a template of a program of the object to allocate a new set of variables for the object and memory space for the object""s execution as needed without necessarily duplicating the instructions of the template.
There have been many attempts at producing reusable code for industrial controllers as well, but unfortunately the hardware of a typical industrial controller will not support more memory management tasks necessary for true object oriented languages. Further the wide range of applications of industrial processors makes it difficult to define standard reusable objects that would significantly increase programming productivity.
The present invention provides relay ladder xe2x80x9cobjectsxe2x80x9d executable on an industrial controller and permitting rapid program development through code reusability. Objects are defined with respect to individual pieces of equipment to ensure generality for a variety of processes that use that particular piece of equipment. Limitations of the programmable controller in memory management are accommodated by pre-loading many instances of the objects into memory of the programmable logic. Individual instances are activated by an instance table in a separate computer which, by allowing interaction between the object and a control program in the separate standard computer, effectively xe2x80x9cactivatexe2x80x9d the object instances. A particular I/O may be linked to activated objects through the use of a special mapping table also executed in relay ladder language.
The identification of the objects to particular pieces of equipment to handle intra-machine logic delegates to the programmable logic controller those tasks for which general computers are ill suited including processing of interlock and safety signals. Higher level control, where reliable availability is of less a concern, may then be handled by a standard computer using powerful program development tools such as scripting languages. Equipment-based objects shield the programmer of the standard computer from a need to understand idiosyncratic internal workings of different equipment from different manufacturers.
Specifically then, the present invention provides an industrial control system for controlling interconnected equipment of equipment types, the equipment having electrical sensors and actuators. The control system includes a programmable logic controller having I/O circuits communicating electrical signals with the actuators and sensors of the equipment and a relay ladder processing unit and a controller memory, all in communication. The controller memory holds multiple predefined relay ladder objects for different equipment types, the relay ladder objects having rungs with contacts representing signals from the sensors and the output coils representing signals to the actuators, the rungs joining the contacts and output coils to provide intra-machine control logically relating operation of the actuators and sensors.
The industrial control system also includes at least one general-purpose computer having a processing unit communicating with the computer memory. The computer memory holds an instancing table matching equipment with particular ones of the relay ladder objects having a matching equipment type. The memory also holds a stored control program executable by the processing unit to provide inter-machine control of the equipment, the control program logically coordinating operation of different interconnected equipment by exchanging data by the predefined relay ladder objects matched to the equipment by the instancing table.
Thus it is one object of the invention to provide object-type capabilities in a programmable logic controller. By pre-storing standardized objects in the controller memory, and linking them to a control program contained in the standard computer using the instancing table, the benefits of prewritten reusable code may be achieved in a programmable logic controller.
The I/O circuits associate the electrical signals of the actuators and sensors with unique I/O addresses in memory. Further the rungs and contacts of the relay ladder objects are associated with unique object addresses in memory. The invention may further include in the controller memory, a relay ladder mapper having series connected pairs of rungs and contacts relating an I/O address in memory to an object address in memory.
Thus it is another object of the invention to allow the relay ladder objects to be freely assigned to different I/O circuits despite the fact that they are prestored in memory. The relay ladder mapper allows the relay objects to have assigned physical addresses and yet to maintain flexibility with respect to their I/O assignment.
The rungs and contacts of the relay ladder objects may be associated with unique object addresses in memory and the controller memory may further include an instancing table identifying the relay ladder objects, their associated equipment types and their object addresses in memory.
Thus it is another object of the invention to permit some variation in the number and type of relay ladder objects preloaded into the programmable logic controller, such variations as may detected by the general purpose computer.
The predefined relay ladder objects may include logic for responding to an emergency stop command and/or for detecting a fault condition of the associated equipment and responding appropriately.
Thus it is another object of the invention to divide control task between two different computer architectures (e.g., programmable logic controller and standard computer) according to their particular strengths of each. The programmable logic controller undertakes the high reliability, low level control including providing emergency stop and the detection of fault conditions. The standard computer is thus freed to work at a higher level removed from the mechanics of the equipment.
In addition, the controller memory may include a monitoring relay ladder program checking for proper operation of the standard processor. The monitoring relay ladder program may communicate with the relay ladder objects to activate their fault conditions if their monitoring program indicates failure of the standard processor in executing the control program.
Thus it is another object of the invention to leverage the high reliability of a programmable logic controller to improve the reliability of the flexible general-purpose computer.
The invention may be used with more than one programmable logic controller each with multiple, predefined relay ladder objects. The instancing table may then match particular equipment with particular ones of the relay ladder objects in a designated one of the multiple programmable controllers. The stored control program logically coordinates operation of different interconnected equipment by exchanging data with the predefined relay ladder objects in a programmable controller designated for the equipment in the instancing table.
Thus it is another object of the invention to provide a simple method for coordinating multiple programmable logic controllers and thus to provide a completely scalable control system.
The foregoing and other objects and advantages of the invention will appear from the following description. In this description, reference is made to the accompanying drawings, which form a part hereof, and in which there is shown by way of illustration, a preferred embodiment of the invention. Such embodiment does not necessarily represent the full scope of the invention, however, and reference must be made therefore to the claims for interpreting the scope of the invention.